package com.resrun.enums;

import lombok.Getter;

@Getter
public enum CertTypeEnum {

    PERSONAL((byte) 1),
    ENTERPRISE((byte) 2);


    private final byte type;

    CertTypeEnum(byte type) {
        this.type = type;
    }

    public static CertTypeEnum of(byte state) {
        for (CertTypeEnum caStateEnum : CertTypeEnum.values()) {
            if (caStateEnum.type == state) {
                return caStateEnum;
            }
        }

        return null;
    }

}
